//
//  DepositModel.swift
//
//  Created by 邱仙凯 on 2020/3/16
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public class ZyaDepositModel: Mappable {

  // MARK: Declaration for string constants to be used to decode and also serialize.
  private struct SerializationKeys {
    static let zPayerNm = "z_payer_nm"
    static let idKey = "id_key"
    static let zRefundDt = "z_refund_dt"
    static let zMoney = "z_money"
    static let zPayDt = "z_pay_dt"
    static let auditMark = "audit_mark"
  }

  // MARK: Properties
  public var zPayerNm: String?
  public var idKey: Int?
  public var zRefundDt: String?
  public var zMoney: Float?
  public var zPayDt: String?
public var auditMark: String?
  // MARK: ObjectMapper Initializers
  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public required init?(map: Map){

  }

  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public func mapping(map: Map) {
    zPayerNm <- map[SerializationKeys.zPayerNm]
    idKey <- map[SerializationKeys.idKey]
    zRefundDt <- map[SerializationKeys.zRefundDt]
    zMoney <- map[SerializationKeys.zMoney]
    zPayDt <- map[SerializationKeys.zPayDt]
    auditMark <- (map[SerializationKeys.auditMark],StringTransform())
  }

  /// Generates description of the object in the form of a NSDictionary.
  ///
  /// - returns: A Key value pair containing all valid values in the object.
  public func dictionaryRepresentation() -> [String: Any] {
    var dictionary: [String: Any] = [:]
    if let value = zPayerNm { dictionary[SerializationKeys.zPayerNm] = value }
    if let value = idKey { dictionary[SerializationKeys.idKey] = value }
    if let value = zRefundDt { dictionary[SerializationKeys.zRefundDt] = value }
    if let value = zMoney { dictionary[SerializationKeys.zMoney] = value }
    if let value = zPayDt { dictionary[SerializationKeys.zPayDt] = value }
     if let value = auditMark { dictionary[SerializationKeys.auditMark] = value }
    return dictionary
  }

}
